﻿namespace Authentication.Data
{
    using Authentication.Configuration;
    using Authentication.Data.DBConfig;
    using Authentication.Model.Model;
    using System.Data.Entity;
    public class AuthenticationEntities  : DbContext
    {
        public AuthenticationEntities()
            : base(SystemConfiguration.ConnectionString)
        {
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new ApplicationConfiguration());//Application
            modelBuilder.Configurations.Add(new UserConfiguration());//User
        }

        public DbSet<Application> Applications { get; set; }
        public DbSet<User> Users { get; set; }
    }
}
